import config from "@/config"
import http from "@/utils/request"

export default {
	//供应商
	apply:{
		lists: {
			url: `${config.API_URL}/adminapi/shop.shopApply/lists`,
			name: "获取供应商列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
        all: {
			url: `${config.API_URL}/adminapi/shop.shopApply/all`,
			name: "获取供应商列表 -- 全部",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopApply/edit`,
			name: "修改供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopApply/add`,
			name: "添加供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopApply/delete`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		deleteAll: {
			url: `${config.API_URL}/adminapi/shop.shopApply/deleteAll`,
			name: "删除供应商",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		update_status: {
			url: `${config.API_URL}/adminapi/shop.shopApply/update_status`,
			name: "修改供应商状态",
			post: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
	//供应商分类
	applyCate:{
		edit: {
			url: `${config.API_URL}/adminapi/shop.shopApplyCate/edit`,
			name: "修改供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.shopApplyCate/add`,
			name: "添加供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.shopApplyCate/delete`,
			name: "删除供应商分类",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.shopApplyCate/all`,
			name: "获取所有供应商分类",
			get: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
    //供应商等级
	applyGrade:{
        list: {
			url: `${config.API_URL}/adminapi/shop.ShopApplyGrade/lists`,
			name: "获取供应商等级列表",
			get: async function(data={}){
				return await http.get(this.url, data);
			}
		},
		edit: {
			url: `${config.API_URL}/adminapi/shop.ShopApplyGrade/edit`,
			name: "修改供应商等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		add: {
			url: `${config.API_URL}/adminapi/shop.ShopApplyGrade/add`,
			name: "添加供应商等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		delete: {
			url: `${config.API_URL}/adminapi/shop.ShopApplyGrade/delete`,
			name: "删除供应商等级",
			post: async function(data={}){
				return await http.post(this.url, data);
			}
		},
		all: {
			url: `${config.API_URL}/adminapi/shop.ShopApplyGrade/all`,
			name: "获取所有供应商等级",
			get: async function(params){
				return await http.post(this.url, params);
			}
		},
	},
}
